package com.yf.user.domain;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.math.BigDecimal;
import java.util.Date;

@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class DrMemberFundsRecord {

	private Integer id;

	//投资记录ID
	private Integer investId;

	//关联的产品ID
	private Integer pid;

	//用户ID
	private Integer uid;

	//交易类型
	private Integer tradeType;

	//0-支出，1收入
	private Integer type;

	//变动金额
	private BigDecimal amount;

	//账户余额
	private BigDecimal balance;

	//状态
	private Integer status;

	//备注
	private String remark;

	//发生时间
	private Date addTime;

	//订单编号
	private String orderNo;

	public DrMemberFundsRecord(Integer pid, Integer investId,Integer uid, Integer tradeType,
							   Integer type, BigDecimal amount, BigDecimal balance,
							   Integer status, String remark,String orderNo) {
		super();
		this.pid = pid;
		this.investId = investId;
		this.uid = uid;
		this.tradeType = tradeType;
		this.type = type;
		this.amount = amount;
		this.balance = balance;
		this.status = status;
		this.remark = remark;
		this.orderNo = orderNo;
	}

	@Getter
	@AllArgsConstructor
	public enum StatusEnum {

		PROCESSING(1, "处理中"),
		FAILED(2, "失败"),
		SUCCEED(3, "成功"),
		RAISING(4, "募集中"),
		REDEEMING(5, "赎回中"),
		REDEEM_SUCCESS(6, "赎回成功");

		private Integer code;
		private String description;
	}

	@Getter
	@AllArgsConstructor
	public enum TradeTypeEnum {

		RECHARGE(1, "充值"),
		WITHDRAW(2, "提现"),
		INVEST(3, "投资"),
		ACTIVITY(4, "活动"),
		WITHDRAW_POUNDAGE(5, "提现手续费"),
		REFUND(6, "回款"),
		PROFIT(7, "收益"),
		REDEEM(8, "赎回"),
		WITHDRAW_REFUND(9, "提现退票"),
		WITHDRAW_REFUND_POUNDAGE(10, "提现退手续费");

		private Integer code;
		private String description;
	}

	@Getter
	@AllArgsConstructor
	public enum TypeEnum {

		INPUT(0, "支出"),
		OUTPUT(1, "收入");

		private Integer code;
		private String description;
	}

}
